package cn.elvinle.bookshop.web.controller;

import cn.elvinle.bookshop.pojo.TbContent;
import cn.elvinle.bookshop.sinterface.TbContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: Elvin
 * datetime: 2018/1/1 10:47
 */
@RestController
@RequestMapping("content")
public class ContentController {

    @Autowired
    private TbContentService tbContentService;

    @RequestMapping("getById/{id}")
    public TbContent getById(@PathVariable Long id){

        System.out.println("ContentController getById ");

        return tbContentService.selectByPrimaryKey(id);
    }

}
